[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
     require(EXPR)

     require EXPR

     require

             Includes the library file specified by EXPR,  or  by
             $_  if  EXPR is not supplied.  Has semantics similar
             to the following subroutine:

                  sub require {
                      local($filename) = @_;
                      return 1 if $INC{$filename};
                      local($realfilename,$result);
                      ITER: {
                       foreach $prefix (@INC) {
                           $realfilename = "$prefix/$filename";
                           if (-f $realfilename) {
                            $result = do $realfilename;
                            last ITER;
                           }
                       }
                       die "Can't find $filename in \@INC";
                      }
                      die $@ if $@;
                      die "$filename did not return true value" unless $result;
                      $INC{$filename} = $realfilename;
                      $result;
                  }

             Note that the file will not be included twice  under
             the same specified name.

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson